function GAD_Etom_Plot_meanER_vs_Mobility(Data_Summary)

for n = 1:size(Data_Summary, 2)
    if strcmp(Data_Summary(n).genotype, 'a5-i-WT')
        Mean_ER_WT(n,1) = Data_Summary(n).Session2_Mean_Ca_Event_Rate;
        Mobility_WT(n,1) = Data_Summary(n).Mobility_Session2;
    end
end
Mean_ER_WT((Mean_ER_WT == 0)) = [];
Mobility_WT((Mobility_WT == 0)) = [];

for n = 1:size(Data_Summary, 2)
    if strcmp(Data_Summary(n).genotype, 'a5-i-KO')
        Mean_ER_KO(n,1) = Data_Summary(n).Session2_Mean_Ca_Event_Rate;
        Mobility_KO(n,1) = Data_Summary(n).Mobility_Session2;
    end
end
Mean_ER_KO((Mean_ER_KO == 0)) = [];
Mobility_KO((Mobility_KO == 0)) = [];

figure
subplot(1,2,1)
F1 = fit(Mobility_WT,Mean_ER_WT,'poly1');
plot(F1,Mobility_WT,Mean_ER_WT,'ob');
xlabel('Mobility')
ylabel('mean(ER)')
set(gca, 'FontSize', 20)
title('p-WT', 'FontSize', 25)
ylim([0,0.2])
xlim([0.3,0.9])
legend('off')

subplot(1,2,2)
F2 = fit(Mobility_KO,Mean_ER_KO,'poly1');
plot(F2,Mobility_KO,Mean_ER_KO,'ob');
xlabel('Mobility')
ylabel('mean(ER)')
set(gca, 'FontSize', 20)
title('\alpha5-i-KO', 'FontSize', 25)
ylim([0,0.2])
xlim([0.3,0.9])
legend('off')

end